package com.ruoyi.car.service.carmanage.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.car.pojo.TbCarPreconfigured;
import com.car.vo.VoCarConfiged;
import com.ruoyi.car.controller.carmanage.TbCarPreconfiguredController;
import com.ruoyi.car.mapper.carmanage.TbCarPreconfiguredMapper;
import com.ruoyi.car.service.carmanage.TbCarPreconfiguredService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

/**
 * @Package:com.ruoyi.car.service.carmanage.impl
 * @Author:敬乾超 2020/6/26 20:33:11
 */
@Service
public class TbCarPreconfiguredServiceImpl implements TbCarPreconfiguredService {

    @Autowired
    private TbCarPreconfiguredMapper tbCarPreconfiguredMapper;

    @Override
    public List<TbCarPreconfigured> getCarPreconfigured(TbCarPreconfigured carPreconfigured) {
        //QueryWrapper<TbCarPreconfigured> wrapper = new QueryWrapper<>();
//        HashMap<String, Object> map = new HashMap<>();
//        map.put("config_name",carPreconfigured.getConfigName());
        //map.put("")
        //tbCarPreconfiguredMapper.selectObjs(wrapper);

        return tbCarPreconfiguredMapper.selectMainList(carPreconfigured);
    }

    @Override
    public TbCarPreconfigured getConfigById(Long id) {
        return tbCarPreconfiguredMapper.mySelectById(id);
    }

    @Override
    public VoCarConfiged getPartsConfigById(Long id) {
        return tbCarPreconfiguredMapper.getPartsConfigById(id);
    }
}
